<?php
namespace app\index\controller;

use app\common\model\UserModel;
use think\Request;

class User
{
	public function info(Request $request = null){
		$token = $request->post("token");
		$UserModel = new UserModel();
		$user = $UserModel->getUserByToken($token);

		if(empty($user)){
			return json(['status'=>400,'msg'=>'找不到用户']);
		}else{
			return json(['status'=>200,'msg'=>'成功','data'=>$user]);
		}
	}

}